Optimal. Leaf size=416 \[ \frac{\sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 \sqrt{-a} b^{3/2}}-\frac{\sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{4 \sqrt{-a} b^{3/2}}+\frac{d \cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 b^2}+\frac{d \cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{4 b^2}+\frac{d \sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 b^2}-\frac{d \sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (x d+\frac{\sqrt{-a} d}{\sqrt{b}}\right )}{4 b^2}-\frac{\cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 \sqrt{-a} b^{3/2}}-\frac{\cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (x d+\frac{\sqrt{-a} d}{\sqrt{b}}\right )}{4 \sqrt{-a} b^{3/2}}-\frac{x \sin (c+d x)}{2 b \left (a+b x^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.572871, antiderivative size = 416, normalized size of antiderivative = 1., number of steps used = 17, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {3343, 3333, 3303, 3299, 3302, 3346} \[ \frac{\sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 \sqrt{-a} b^{3/2}}-\frac{\sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{4 \sqrt{-a} b^{3/2}}+\frac{d \cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 b^2}+\frac{d \cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{CosIntegral}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{4 b^2}+\frac{d \sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 b^2}-\frac{d \sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (x d+\frac{\sqrt{-a} d}{\sqrt{b}}\right )}{4 b^2}-\frac{\cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}+c\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 \sqrt{-a} b^{3/2}}-\frac{\cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (x d+\frac{\sqrt{-a} d}{\sqrt{b}}\right )}{4 \sqrt{-a} b^{3/2}}-\frac{x \sin (c+d x)}{2 b \left (a+b x^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3343
Rule 3333
Rule 3303
Rule 3299
Rule 3302
Rule 3346
Rubi steps
\begin{align*} \int \frac{x^2 \sin (c+d x)}{\left (a+b x^2\right )^2} \, dx &=-\frac{x \sin (c+d x)}{2 b \left (a+b x^2\right )}+\frac{\int \frac{\sin (c+d x)}{a+b x^2} \, dx}{2 b}+\frac{d \int \frac{x \cos (c+d x)}{a+b x^2} \, dx}{2 b}\\ &=-\frac{x \sin (c+d x)}{2 b \left (a+b x^2\right )}+\frac{\int \left (\frac{\sqrt{-a} \sin (c+d x)}{2 a \left (\sqrt{-a}-\sqrt{b} x\right )}+\frac{\sqrt{-a} \sin (c+d x)}{2 a \left (\sqrt{-a}+\sqrt{b} x\right )}\right ) \, dx}{2 b}+\frac{d \int \left (-\frac{\cos (c+d x)}{2 \sqrt{b} \left (\sqrt{-a}-\sqrt{b} x\right )}+\frac{\cos (c+d x)}{2 \sqrt{b} \left (\sqrt{-a}+\sqrt{b} x\right )}\right ) \, dx}{2 b}\\ &=-\frac{x \sin (c+d x)}{2 b \left (a+b x^2\right )}-\frac{\int \frac{\sin (c+d x)}{\sqrt{-a}-\sqrt{b} x} \, dx}{4 \sqrt{-a} b}-\frac{\int \frac{\sin (c+d x)}{\sqrt{-a}+\sqrt{b} x} \, dx}{4 \sqrt{-a} b}-\frac{d \int \frac{\cos (c+d x)}{\sqrt{-a}-\sqrt{b} x} \, dx}{4 b^{3/2}}+\frac{d \int \frac{\cos (c+d x)}{\sqrt{-a}+\sqrt{b} x} \, dx}{4 b^{3/2}}\\ &=-\frac{x \sin (c+d x)}{2 b \left (a+b x^2\right )}-\frac{\cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \int \frac{\sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{\sqrt{-a}+\sqrt{b} x} \, dx}{4 \sqrt{-a} b}+\frac{\left (d \cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right )\right ) \int \frac{\cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{\sqrt{-a}+\sqrt{b} x} \, dx}{4 b^{3/2}}+\frac{\cos \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \int \frac{\sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{\sqrt{-a}-\sqrt{b} x} \, dx}{4 \sqrt{-a} b}-\frac{\left (d \cos \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right )\right ) \int \frac{\cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{\sqrt{-a}-\sqrt{b} x} \, dx}{4 b^{3/2}}-\frac{\sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \int \frac{\cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{\sqrt{-a}+\sqrt{b} x} \, dx}{4 \sqrt{-a} b}-\frac{\left (d \sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right )\right ) \int \frac{\sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{\sqrt{-a}+\sqrt{b} x} \, dx}{4 b^{3/2}}-\frac{\sin \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \int \frac{\cos \left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{\sqrt{-a}-\sqrt{b} x} \, dx}{4 \sqrt{-a} b}-\frac{\left (d \sin \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right )\right ) \int \frac{\sin \left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{\sqrt{-a}-\sqrt{b} x} \, dx}{4 b^{3/2}}\\ &=\frac{d \cos \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Ci}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 b^2}+\frac{d \cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Ci}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{4 b^2}-\frac{\text{Ci}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right ) \sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right )}{4 \sqrt{-a} b^{3/2}}+\frac{\text{Ci}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right ) \sin \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right )}{4 \sqrt{-a} b^{3/2}}-\frac{x \sin (c+d x)}{2 b \left (a+b x^2\right )}-\frac{\cos \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 \sqrt{-a} b^{3/2}}+\frac{d \sin \left (c+\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}-d x\right )}{4 b^2}-\frac{\cos \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{4 \sqrt{-a} b^{3/2}}-\frac{d \sin \left (c-\frac{\sqrt{-a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{\sqrt{-a} d}{\sqrt{b}}+d x\right )}{4 b^2}\\ \end{align*}
Mathematica [C] time = 0.814362, size = 583, normalized size = 1.4 \[ \frac{-a^{3/2} d \sin \left (c-\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (d \left (x+\frac{i \sqrt{a}}{\sqrt{b}}\right )\right )+a^{3/2} d \sin \left (c+\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{i \sqrt{a} d}{\sqrt{b}}-d x\right )+i b^{3/2} x^2 \cos \left (c-\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (d \left (x+\frac{i \sqrt{a}}{\sqrt{b}}\right )\right )+i b^{3/2} x^2 \cos \left (c+\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{i \sqrt{a} d}{\sqrt{b}}-d x\right )+\left (a+b x^2\right ) \text{CosIntegral}\left (d \left (x+\frac{i \sqrt{a}}{\sqrt{b}}\right )\right ) \left (i \sqrt{b} \sin \left (c-\frac{i \sqrt{a} d}{\sqrt{b}}\right )+\sqrt{a} d \cos \left (c-\frac{i \sqrt{a} d}{\sqrt{b}}\right )\right )+\left (a+b x^2\right ) \text{CosIntegral}\left (d \left (x-\frac{i \sqrt{a}}{\sqrt{b}}\right )\right ) \left (\sqrt{a} d \cos \left (c+\frac{i \sqrt{a} d}{\sqrt{b}}\right )-i \sqrt{b} \sin \left (c+\frac{i \sqrt{a} d}{\sqrt{b}}\right )\right )-\sqrt{a} b d x^2 \sin \left (c-\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (d \left (x+\frac{i \sqrt{a}}{\sqrt{b}}\right )\right )+\sqrt{a} b d x^2 \sin \left (c+\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{i \sqrt{a} d}{\sqrt{b}}-d x\right )+i a \sqrt{b} \cos \left (c-\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (d \left (x+\frac{i \sqrt{a}}{\sqrt{b}}\right )\right )+i a \sqrt{b} \cos \left (c+\frac{i \sqrt{a} d}{\sqrt{b}}\right ) \text{Si}\left (\frac{i \sqrt{a} d}{\sqrt{b}}-d x\right )-2 \sqrt{a} b x \sin (c+d x)}{4 \sqrt{a} b^2 \left (a+b x^2\right )} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.06, size = 1804, normalized size = 4.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 1.88163, size = 666, normalized size = 1.6 \begin{align*} -\frac{4 \, a b d x \sin \left (d x + c\right ) -{\left (a b d^{2} x^{2} + a^{2} d^{2} +{\left (b^{2} x^{2} + a b\right )} \sqrt{\frac{a d^{2}}{b}}\right )}{\rm Ei}\left (i \, d x - \sqrt{\frac{a d^{2}}{b}}\right ) e^{\left (i \, c + \sqrt{\frac{a d^{2}}{b}}\right )} -{\left (a b d^{2} x^{2} + a^{2} d^{2} -{\left (b^{2} x^{2} + a b\right )} \sqrt{\frac{a d^{2}}{b}}\right )}{\rm Ei}\left (i \, d x + \sqrt{\frac{a d^{2}}{b}}\right ) e^{\left (i \, c - \sqrt{\frac{a d^{2}}{b}}\right )} -{\left (a b d^{2} x^{2} + a^{2} d^{2} +{\left (b^{2} x^{2} + a b\right )} \sqrt{\frac{a d^{2}}{b}}\right )}{\rm Ei}\left (-i \, d x - \sqrt{\frac{a d^{2}}{b}}\right ) e^{\left (-i \, c + \sqrt{\frac{a d^{2}}{b}}\right )} -{\left (a b d^{2} x^{2} + a^{2} d^{2} -{\left (b^{2} x^{2} + a b\right )} \sqrt{\frac{a d^{2}}{b}}\right )}{\rm Ei}\left (-i \, d x + \sqrt{\frac{a d^{2}}{b}}\right ) e^{\left (-i \, c - \sqrt{\frac{a d^{2}}{b}}\right )}}{8 \,{\left (a b^{3} d x^{2} + a^{2} b^{2} d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} \sin{\left (c + d x \right )}}{\left (a + b x^{2}\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} \sin \left (d x + c\right )}{{\left (b x^{2} + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]